﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
namespace Langben.DAL
{
    [MetadataType(typeof(MessageMetadata))]//使用MessageMetadata对Message进行数据验证
    public partial class Message : IBaseEntity
    {

        #region 自定义属性，即由数据实体扩展的实体

        #endregion

    }
    public class MessageMetadata
    {
        [ScaffoldColumn(false)]
        [Display(Name = "RowGuid", Order = 1)]
        public object RowGuid { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "创建时间", Order = 2)]
        [DataType(System.ComponentModel.DataAnnotations.DataType.DateTime, ErrorMessage = "时间格式不正确")]
        public DateTime? CreateTime { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "创建人", Order = 3)]
        [StringLength(50, ErrorMessage = "长度不可超过50")]
        public object CreatePerson { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "内容", Order = 4)]
        [StringLength(4000, ErrorMessage = "长度不可超过4000")]
        public object Content { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "状态", Order = 5)]
        [StringLength(4000, ErrorMessage = "长度不可超过4000")]
        public object State { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "电话号码", Order = 6)]
         
        public object TelNo { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "成功数", Order = 7)]
        [Range(0, 2147483646, ErrorMessage = "数值超出范围")]
        public int? SuccessCount { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "失败数", Order = 8)]
        [Range(0, 2147483646, ErrorMessage = "数值超出范围")]
        public int? FaildCount { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "付款数", Order = 9)]
        [Range(0, 2147483646, ErrorMessage = "数值超出范围")]
        public int? PayCount { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "用户名称", Order = 10)]
         
        public object UserName { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "类型", Order = 11)]
        [StringLength(50, ErrorMessage = "长度不可超过50")]
        public object Type { get; set; }


    }


}

